/*
 * @Author: 尔尔
 * @Date: 2024-02-22 11:05:51
 * @LastEditors: 尔尔
 * @LastEditTime: 2024-05-24 10:00:28
 * @FilePath: \ERP\src\api\fault\faultlist.js
 * @filePurpose:
 */
import request from '@/utils/request'

// 查询设备保养计划列表
export function listFault(query) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/verifylist',
    method: 'get',
    params: query
  })
}

// 保养列表子菜单查询
export function listFaultChild(query) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/verifychildlist/' + query.id,
    method: 'get',
    params: query
  })
}

export function listFaultChild1(query) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/verifychildlist1/' + query.id,
    method: 'get',
    params: query
  })
}

// 故障核实查询
export function getFault(id) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/sel/' + id,
    method: 'get'
  })
}

// 添加核实信息
export function editFault(data) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/VerifyEdit',
    method: 'post',
    data
  })
}

// 批量故障核实
export function editFaultMore(data) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/VerifyEditBatch',
    method: 'post',
    data
  })
}

// 上传工艺通知
export function breakdownUp(data) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/breakdownUp',
    method: 'post',
    data
  })
}

// 提交
export function submitProduction(data) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/submitRepairProduct',
    method: 'post',
    data
  })
}

// 审批
export function productionApprove(data) {
  return request({
    url: '/TMaintenanceSchedule/TMaintenanceSchedule/approverRepair',
    method: 'post',
    data
  })
}
// 查询零组件记录表


export function RecordList(params) {
  return request({
    url: '/erp/componentInspectionRecord/list',
    method: 'get',
    params
  })
}

// 修改零组件

export function editRecord(data) {
  return request({
    url: '/erp/componentInspectionRecord',
    method: 'put',
    data
  })
}

// 查询多余物记录列表
export function componentList(params) {
  return request({
    url: '/erp/componentRedundancy/componentList',
    method: 'get',
    params
  })
}


// 查询多余物记录列表
export function redundancyEdit(data) {
  return request({
    url: '/erp/componentRedundancy/redundancyEdit',
    method: 'put',
    data
  })
}

// 查询多余物记录列表
export function component1Id(id) {
  return request({
    url: '/erp/repairProduct/component1/'+id,
    method: 'post'
  })
}



